<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@page import="model.UserModel" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<%
	String alert = (String) session.getAttribute("alert");
	UserModel user = (UserModel) session.getAttribute("user_session");
	if(user != null){
		response.sendRedirect("./");
	}
%>
<form action="Login">
	<table width="100%" style="border-left-width: 1px;" >
		<tr><td colspan="2">Phần đăng nhập </td></tr>
		
		<tr>
			<td>Tên ĐN</td>
			<td><input type="text" name="un"></td>
		</tr>
		<tr>
			<td>Mật khẩu</td>
			<td><input type="password" name="upd"></td>
		</tr>
		<tr>
			<td colspan="2" align="center"> <input type="hidden" name="action" value="dangnhap">
			<input type="submit" value="Đăng nhập"></td>
		</tr>
		<tr>
			<td colspan="2">
				<%
					if (alert != null) {
						out.println(alert);
						session.removeAttribute("alert");
					}
				%>
			</td>
		</tr>
	</table>
</form>
</body>
</html>